﻿/*!	@file	r_input_device_controll_in.h
	@brief	入力装置パラメータ設定用インターフェース
Copyright (c) 2009 Yuya Yamaguchi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef _R_INPUT_DEVICE_CONTROLL_IN_H_
#define _R_INPUT_DEVICE_CONTROLL_IN_H_

#include "r_input_device_controll.h"


namespace r{
	namespace input{
		//! 入力デバイス状態
		/*!
		*/
		class DeviceControllIn : public DeviceControll
		{
			RRTTI_REFLECTION_DECLARE
		public:
			//! コンストラクタ
			DeviceControllIn();
			//! デストラクタ
			virtual ~DeviceControllIn();
		public:
			// -------------------------------------
			// 設定処理はシステムが行います
			// -------------------------------------
			//! キー入力開始
			/*!
			*/
			virtual	void		beginInput ( void );
			//! キー入力終了、入力状況を基に簡単に取り出し可能なキー情報を作成
			/*!
			*/
			virtual	void		endInput ( void );
			//! デジタルキー入力
			/*!
			*/
			void				setKey ( r_si32 keyID, r_bool press );
			//! アナログ入力
			/*!
			*/
			void				setAnalog ( r_si32 analogID, r_f32 val );
			//! 2Dアナログ入力
			/*!
			*/
			void				setAnalog2D ( r_si32 analog2dID, const Analog2D& val );
			//! スクリーン入力
			/*!
			*/
			void				setScreen ( const Screen& val );
			//! 初期化
			/*! 全てのキーを初期状態にします
			*/
			void				init ( void );
			//! デバイスが接続されているかを設定
			/*!
			*/
			void				setIsConnect ( r_bool enable );
		};
	}
}

#endif // _R_INPUT_DEVICE_CONTROLL_IN_H_
